function hiLoad(ribbonUI) {
	if (typeof (wps.ribbonUI) != "object") {
		wps.ribbonUI = ribbonUI
	}
	return true
}
var WebNotifycount = 0;
/**
 * 定义根目录
 */
var root = window.location.href.match(/^.*\//g)[0]
/**
 * For <button id="sayhi1" label="hi" onAction="sayhi" visible="true" size="large"/>
 */
function sayhi() {
	wps.ShowDialog(root + "dialog.html", "Hi!", 450 * window.devicePixelRatio, 450 * window.devicePixelRatio, false)
}
/**
 * For <button id="panel1" label="pane1" onAction="panel1Show">
 */
function panel1Show() {
	let tsId = wps.PluginStorage.getItem("taskpane_id")
	if (!tsId) {
		let tskpane = wps.CreateTaskPane(root + "panel1.html")
		let id = tskpane.ID
		wps.PluginStorage.setItem("taskpane_id", id)
		tskpane.Visible = true
	} else {
		let tskpane = wps.GetTaskPane(tsId)
		tskpane.Visible = !tskpane.Visible
	}
}

function getHiimag() {
	return root + "hi.svg"
}